import type { MenuMixedOptions } from './helper'

export const routeRecordRaw: MenuMixedOptions[] = [
  {
    path: 'dashboard',
    name: 'dashboard',
    icon: 'iconify ph--gauge',
    label: '仪表板',
    redirect: 'console',
    meta: {
      permissionId: 1
    },
    children: [
      {
        path: 'console',
        name: 'dashboardConsole',
        icon: 'iconify ph--desktop',
        label: '主控台',
        meta: {
          componentName: 'DashboardConsole',
          pinned: true,
          showTab: true,
          permissionId: 2
        },
        component: 'dashboard/index',
      },
      {
        path: 'monitor',
        name: 'dashboardMonitor',
        icon: 'iconify ph--monitor',
        label: '监控台',
        meta: {
          componentName: 'DashboardMonitor',
          showTab: true,
          permissionId: 3
        },
        component: 'dashboard/monitor',
      },
      {
        path: 'workbench',
        name: 'dashboardWorkbench',
        icon: 'iconify ph--briefcase',
        label: '工作台',
        meta: {
          componentName: 'DashboardWorkbench',
          showTab: true,
          permissionId: 4
        },
        component: 'dashboard/workbench',
      },
    ],
  },
  {
    path: 'platform-management',
    name: 'platformManagement',
    icon: 'iconify ph--users',
    label: '平台管理',
    redirect: 'user-management',
    meta: {
      permissionId: 5
    },
    children: [
      {
        path: 'user-management',
        name: 'userManagement',
        icon: 'iconify ph--users',
        label: '用户管理',
        meta: {
          componentName: 'UserManagement',
          showTab: true,
          permissionId: 6
        },
        component: 'platform-management/user-management/index',
      },
      {
        path: 'role-management',
        name: 'roleManagement',
        icon: 'iconify ph--user-circle',
        label: '角色管理',
        meta: {
          componentName: 'RoleManagement',
          showTab: true,
          permissionId: 7
        },
        component: 'platform-management/role-management/index',
      },
      {
        path: 'permission-management',
        name: 'permissionManagement',
        icon: 'iconify ph--key',
        label: '权限管理',
        meta: {
          componentName: 'PermissionManagement',
          showTab: true,
          permissionId: 8
        },
        component: 'platform-management/permission-management/index',
      },
    ],
  },
  {
    path: 'contract-management',
    name: 'contractManagement',
    icon: 'iconify ph--file-text',
    label: '合同管理',
    meta: {
      componentName: 'ContractManagement',
      showTab: true,
      permissionId: 9
    },
    component: 'contract-management/index',
  },
  {
    path: 'tenant-management',
    name: 'tenantManagement',
    icon: 'iconify ph--building',
    label: '租户管理',
    redirect: 'tenant-settings',
    meta: {
      permissionId: 10
    },
    children: [
      {
        path: 'tenant-settings',
        name: 'tenantSettings',
        icon: 'iconify ph--gear',
        label: '租户设置',
        meta: {
          componentName: 'TenantSettings',
          showTab: true,
          permissionId: 11
        },
        component: 'tenant-management/tenant-settings/index',
      },
      {
        path: 'admin-settings',
        name: 'adminSettings',
        icon: 'iconify ph--crown',
        label: '超管设置',
        meta: {
          componentName: 'AdminSettings',
          showTab: true,
          permissionId: 12
        },
        component: 'tenant-management/admin-settings/index',
      },
    ],
  },
  {
    path: 'data-show',
    name: 'dataShow',
    label: '数据展示',
    icon: 'icon-[fluent--data-area-32-regular]',
    redirect: 'data-table',
    meta: {
      permissionId: 13
    },
    children: [
      {
        path: 'data-table',
        name: 'dataTable',
        icon: 'iconify ph--table',
        label: '数据表格',
        meta: {
          componentName: 'DataTable',
          title: '数据表格',
          showTab: true,
          permissionId: 14
        },
        component: 'data-show/data-table/index',
      },
      {
        path: 'data-form',
        name: 'dataForm',
        icon: 'iconify ph--article',
        label: '数据表单',
        meta: {
          componentName: 'DataForm',
          title: '数据表单',
          showTab: true,
          permissionId: 15
        },
        component: 'data-show/data-form/index',
      },
    ],
  },
  {
    path: 'multi-level-menu',
    redirect: 'level-2-1',
    name: 'multiLevelMenu',
    icon: 'iconify ph--list',
    label: '多级菜单',
    meta: {
      permissionId: 16
    },
    children: [
      {
        path: 'level-2-1',
        key: 'level-2-1',
        name: 'level-2-1',
        icon: 'iconify ph--squares-four',
        label: '图标菜单',
        component: 'multi-level-menu/index',
        meta: {
          showTab: true,
          permissionId: 17
        },
      },
      {
        path: 'level-2-2',
        key: 'level-2-2',
        name: 'level-2-2',
        label: '无图标菜单',
        component: 'multi-level-menu/index',
        meta: {
          showTab: true,
          permissionId: 18
        },
      },
      {
        type: 'group',
        key: 'group-1',
        label: '分组',
        children: [
          {
            path: 'level-2-3',
            key: 'level-2-3',
            name: 'level-2-3',
            icon: 'iconify ph--squares-four',
            label: '菜单2-3',
            component: 'multi-level-menu/index',
            meta: {
              showTab: true,
              permissionId: 19
            },
          },
          {
            type: 'divider',
            key: 'divider-1',
          },
          {
            path: 'level-2-4',
            key: 'level-2-4',
            name: 'level-2-4',
            icon: 'iconify ph--squares-four',
            label: '不创建tab',
            component: 'multi-level-menu/index',
            meta: {
              permissionId: 20
            },
          },
        ],
      },
      {
        path: 'level-2-5',
        key: 'level-2-5',
        name: 'level-2-5',
        redirect: 'level-2-5/level-2-1',
        icon: 'iconify ph--squares-four',
        label: '三级菜单',
        meta: {
          permissionId: 21
        },
        children: [
          {
            path: 'level-3-1',
            key: 'level-3-1',
            name: 'level-3-1',
            icon: 'iconify ph--squares-four',
            label: '菜单3-1',
            component: 'multi-level-menu/index',
            meta: {
              showTab: true,
              permissionId: 22
            },
          },
          {
            type: 'divider',
            key: 'divider-2',
          },
          {
            type: 'group',
            key: 'group-2',
            label: '分组',
            children: [
              {
                type: 'divider',
                key: 'divider-3',
              },
            ],
          },
          {
            path: 'level-3-2',
            key: 'level-3-2',
            name: 'level-3-2',
            label: '菜单3-2',
            icon: 'iconify ph--squares-four',
            component: 'multi-level-menu/index',
            meta: {
              showTab: true,
              permissionId: 23
            },
          },
          {
            path: 'level-3-3',
            key: 'level-3-3',
            name: 'level-3-3',
            label: '禁用菜单',
            icon: 'iconify ph--squares-four',
            component: 'multi-level-menu/index',
            disabled: true,
            meta: {
              showTab: true,
              permissionId: 24
            },
          },
        ],
      },
    ],
  },
  {
    path: 'dynamic-route/:id?/:name?',
    name: 'dynamicRoute',
    label: '动态路由',
    icon: 'icon-[material-symbols--dynamic-feed]',
    meta: {
      componentName: 'DynamicRoute',
      showTab: true,
      enableMultiTab: true,
      renderTabTitle({ id, name }) {
        return `动态路由${id ? `-${id}` : ''}${name ? `-${name}` : ''}`
      },
      permissionId: 25
    },
    component: 'dynamic-route/index',
  },
  {
    path: 'feedback',
    name: 'feedback',
    icon: 'iconify ph--messenger-logo',
    label: '反馈组件',
    meta: {
      componentName: 'Feedback',
      showTab: true,
      permissionId: 26
    },
    component: 'feedback/index',
  },
  {
    path: 'drag-drop',
    name: 'dragDrop',
    icon: 'icon-[pixelarticons--drag-and-drop]',
    label: '拖拽模块',
    meta: {
      componentName: 'DragDrop',
      showTab: true,
      permissionId: 27
    },
    component: 'drag-drop/index',
  },
  {
    path: 'not-found-page-404',
    name: 'notfoundPage',
    icon: 'icon-[streamline-freehand--server-error-404-not-found]',
    label: '404页面',
    meta: {
      componentName: 'notfoundPage404',
      permissionId: 28
    },
    component: 'error-page/404',
  },
  {
    path: '/about',
    key: 'about',
    name: 'about',
    icon: 'iconify ph--info',
    label: '关于项目',
    component: 'about/index',
    meta: {
      showTab: true,
      permissionId: 29
    },
  },
]
